package com.btrh.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.btrh.model.ADbUrl;
import com.btrh.service.IADbUrlService;
import com.btrh.util.R;
import com.sun.corba.se.spi.ior.ObjectKey;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.Size;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 多数据库存储表 前端控制器
 * </p>
 *
 * @author zyy
 * @since 2020-04-27
 */
@RestController
@RequestMapping("/aDbUrl")
public class ADbUrlController {

    @Autowired
    IADbUrlService iaDbUrlService;


    @RequestMapping("100")
    public R selectUrl(Integer page, Integer size){
        //IPage<ADbUrl> pages = new Page<>(page,size);

        //IPage<ADbUrl> page1 = iaDbUrlService.page(pages, null);

        Page<Map> pages = new Page<>(page,size);

        IPage<Map> maps = iaDbUrlService.getAdbUrlList(pages);

        return R.success(maps);
    }



}

